<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Budget.aspx.vb" Inherits="Budget_Budget" Title="Budget"  MasterPageFile="~/MasterPageExpandable.master"%>

<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc2" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc3" %>

<%@ Register Src="~/Budget/BudgetSubNav.ascx" TagName="SubNavPlaceHolder" TagPrefix="uc1" %>
<%@ Register Assembly="InputControls" Namespace="InputControls" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <cc1:EditCaseSubNav ID="EditCaseSubNav2" runat="server" InvalidTabs="none" ShowCaseNotes="True" ShowEmployeeInfo="True" ShowLegalGuardianInfo="True" ShowMedicalCareProvider="True" ShowParticipantRepInfo="True" ShowPersonalInfo="True" UseTable="true" Width="862px" />
        <cc3:FinancialSubNav  ID="FinancialSubName" runat="server" InvalidTabs="none" ShowBudgetInfo="True" ShowSubmitSpendingPlan="True" ShowViewSpendingPlan="True" ShowGetSpendingPlan="True" ShowViewMonthlyStatement="True" ShowSubmitMonthlyStatement="True" ShowGetMonthlyStatement="True" ShowHistory="True" ShowAffirmations="true" UseTable="true" Width="862px" style="left: 229px; top: 16px" />
    <asp:ObjectDataSource ID="BudgetObjectDataSource" runat="server" DataObjectTypeName="Cdm.DataCore.Budget.Budget" UpdateMethod="UpdateInstance" DeleteMethod="RemoveInstance()" SelectMethod="ListAllbyParticipantId" TypeName="Cdm.DataCore.Budget.Budget" >
        <SelectParameters>
            <asp:SessionParameter Name="ParticipantId" SessionField="ParticipantId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <div style="position:relative; left:20px; top:20px; width:938px; height:315px;" runat="server" id="maindiv">
        <span style="position:relative; left:0px; top:0px; 
            font-family:MS Sans Serif, Arial, Verdana, Sans-Serif; font-size: 1em; font-weight:bold; color:#21334B;">
            <h1><a id="pagecontent">Budget for <asp:Label runat="server" ID="ParticipantName" /></a></h1>
        </span>
        <div id="gridViewDiv" runat="server" style="position:relative; height:220px; left:1px; top:0px; width: 942px; margin-bottom: .3em;  overflow:auto;">
            <cc2:ValidationErrorSummary ID="ErrorSummary" runat="server" Message="Please correct the following Error" Visible="false" Text="Please correct;" />
            <asp:Panel ID="ConfirmPanel" runat="server" Visible="false">
                <asp:Button ID="ConfirmDeleteButton" runat="server" Text="Confirm" CommandArgument="" />
                <asp:Button ID="CancelDeleteButton" runat="server" Text="Cancel" CommandArgument="" />
            </asp:Panel>
            <asp:GridView Font-Bold="true" DataKeyNames="BudgetId, ParticipantId" Font-Names="Arial, MS Sans Serif, Verdana, Sans-Serif" CellPadding="5" BorderColor="gray" BorderStyle="solid" Width="875px" Font-Size="small" BorderWidth="1" ID="BudgetGridView" runat="server" AutoGenerateColumns="False" DataSourceID="BudgetObjectDataSource">
                <HeaderStyle CssClass="adminHeaderStyle" BackColor="#C3CAD4" BorderColor="#21334B" VerticalAlign="Top" />
                <Columns>
                    <asp:BoundField DataField="EffectiveDateDisplay" SortExpression="EffectiveDate" HeaderText="Effective Date" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Font-Bold="false" ItemStyle-HorizontalAlign="right" />
                    <asp:BoundField DataField="ExpirationDateDisplay" SortExpression="ExpirationDate" HeaderText="Expiration Date" ItemStyle-Font-Bold="false" />
                    <asp:TemplateField HeaderText="Budget Period">
                    <ItemTemplate>
                        <%#Eval("BudgetPeriodDescription") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                    <asp:DropDownList ID="BudgetPeriodDropDownList" runat="server"></asp:DropDownList>
                    </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="BudgetAmount" SortExpression="BudgetAmount" HeaderText="Budget Amount" DataFormatString="{0:C}" HtmlEncode="false" ItemStyle-HorizontalAlign="right" ItemStyle-Font-Bold="false" />
                    <asp:CommandField EditText="Edit" ShowEditButton="true" CausesValidation="true" HeaderText="Action" AccessibleHeaderText="Action" ItemStyle-Font-Bold="false" />
                    <asp:TemplateField Headertext="Delete" AccessibleHeaderText="Delete" ItemStyle-Font-Bold="false">
                    <ItemTemplate>
                    <asp:Button ID="DeleteButton" CommandName="Remove" runat="server" Text="Delete" />
                    </ItemTemplate>
                    <EditItemTemplate></EditItemTemplate>
                    </asp:TemplateField>
                    
                </Columns>
                <AlternatingRowStyle BackColor="#E8ECF4" />
            </asp:GridView>
            <asp:FormView ID="BudgetFormView" runat="server" DefaultMode="Insert" DataSourceID="BudgetObjectDataSource" DataKeyNames="BudgetId, ParticipantId" Width="825px" HorizontalAlign="Center" Visible="False">
                <InsertItemTemplate>
                    <table><tr><td colspan="2">
                    <cc1:GenericInputControl ID="txtEffectiveDateInsert" ControlType="Date" runat="server" cssClassLabel="label" cssClassControl="form" Required="true" Title="Effective Date:" BoundProperty="EffectiveDate" Editable="True" Value=""  />
                    </td><td colspan="2">
                    <cc1:GenericInputControl ID="txtExpirationDateInsert" ControlType="Date" runat="server" cssClassLabel="label" cssClassControl="form" Required="true" Title="Expiration Date:" BoundProperty="ExpirationDate" Editable="True" Value=""  />
                    </td></tr><tr><td>
                    <asp:Label ID="lblBudgetAmountInsert" runat="server" CssClass="label" Font-Bold="true" AssociatedControlID="txtBudgetAmountInsert" >Budget Amount*:</asp:Label>
                    </td><td>
                    <asp:TextBox ID="txtBudgetAmountInsert" runat="server" CssClass="form" Text='<%# Bind("BudgetAmount") %>'></asp:TextBox>
                    </td><td>
                    <asp:Label ID="lblBudgetPeriodInsert" runat="server" CssClass="label" Font-Bold="true" AssociatedControlID="ddlBudgetPeriodInsert" >Budget Period*:</asp:Label>
                    </td><td valign="bottom">
                    <asp:DropDownList ID="ddlBudgetPeriodInsert" runat="server" cssClass="Form" />
                    </td></tr>
                    </table>
                </InsertItemTemplate>
                <EditItemTemplate>
                    <cc1:GenericInputControl ID="txtEffectiveDateEdit" ControlType="Date" runat="server" cssClassLabel="label" cssClassControl="form" Required="true" Title="Effective Date:" BoundProperty="EffectiveDate" Editable="True" Value=""  />
                    <asp:Label ID="lblBudgetAmountEdit" runat="server" CssClass="label" AssociatedControlID="txtBudgetAmountEdit" >BudgetAmount*:</asp:Label>
                    <asp:TextBox ID="txtBudgetAmountEdit" runat="server" CssClass="form" Text='<%# Bind("BudgetAmount") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <cc1:GenericInputControl ID="txtEffectiveDateItem" ControlType="Date" runat="server" cssClassLabel="label" cssClassControl="form" Required="true" Title="Effective Date:" BoundProperty="EffectiveDate" Editable="True" Value=""  />
                    <asp:Label ID="lblBudgetAmountItem" runat="server" CssClass="label" AssociatedControlID="txtBudgetAmountItem" >Budget Amount*:</asp:Label>
                    <asp:TextBox ID="txtBudgetAmountItem" runat="server" CssClass="form" Text='<%# Bind("BudgetAmount") %>'></asp:TextBox>
                </ItemTemplate>
            </asp:FormView>
            <table>
        <tr><td colspan="2" align="center"><asp:Button ID="SubmitButton" runat="server" Text="Submit" Visible="false" />
                    </td><td colspan="2" align="center"><asp:Button ID="CancelButton" runat="server" Text="Cancel"  Visible="false"/>
</td></tr></table>
        </div>
        

    </div>
   
    <div style="position:relative; left:11px; top:85px; width:918px;" runat="server" id="secdiv">
        <span style="position:relative; left:0px; top:0px; 
            font-family:MS Sans Serif, Arial, Verdana, Sans-Serif; font-size: 1em; font-weight:bold; color:#21334B;">
            <asp:Label runat="server" ID="ParticipantName2" Visible="False" />
        </span>
    </div>
    
</asp:Content>

<asp:Content ID="FixedHeaderContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder2">
                <asp:Button ID="AddBudgetButton" runat="server" Text="Add Budget" />
</asp:Content>
